package com.liohi.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.Data;

/**
 * 
 * @TableName laboratory_allocs
 */
@TableName(value ="laboratory_allocs")
@Data
public class LaboratoryAllocs implements Serializable {
    /**
     * 
     */
    @TableId(value = "laboratory_allocs_id", type = IdType.AUTO)
    private Integer laboratoryAllocsId;

    /**
     * 
     */
    @TableField(value = "classId")
    private Integer classid;

    /**
     * 
     */
    @TableField(value = "courseId")
    private Integer courseid;

    /**
     * 
     */
    @TableField(value = "user_id")
    private Integer userId;

    /**
     * 
     */
    @TableField(value = "laboratory_id")
    private Integer laboratoryId;

    /**
     * 
     */
    @TableField(value = "experiments_id")
    private Integer experimentsId;

    /**
     * 
     */
    @TableField(value = "class_num")
    private Integer classNum;

    /**
     * 
     */
    @TableField(value = "class_number")
    private String classNumber;

    /**
     * 
     */
    @TableField(value = "course_number")
    private String courseNumber;

    /**
     * 
     */
    @TableField(value = "create_time")
    private LocalDateTime createTime;

    /**
     * 
     */
    @TableField(value = "lab_id")
    private Integer labId;

    /**
     * 
     */
    @TableField(value = "lab_time")
    private LocalDateTime labTime;

    /**
     * 
     */
    @TableField(value = "teacher_ids")
    private Integer teacherIds;

    /**
     * 
     */
    @TableField(value = "train_id")
    private Integer trainId;

    /**
     * 
     */
    @TableField(value = "train_source")
    private String trainSource;

    /**
     * 用户类型 1老师 2学生 3社会人士
     */
    @TableField(value = "type")
    private String type;

    /**
     * 
     */
    @TableField(value = "update_time")
    private LocalDateTime updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        LaboratoryAllocs other = (LaboratoryAllocs) that;
        return (this.getLaboratoryAllocsId() == null ? other.getLaboratoryAllocsId() == null : this.getLaboratoryAllocsId().equals(other.getLaboratoryAllocsId()))
            && (this.getClassid() == null ? other.getClassid() == null : this.getClassid().equals(other.getClassid()))
            && (this.getCourseid() == null ? other.getCourseid() == null : this.getCourseid().equals(other.getCourseid()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getLaboratoryId() == null ? other.getLaboratoryId() == null : this.getLaboratoryId().equals(other.getLaboratoryId()))
            && (this.getExperimentsId() == null ? other.getExperimentsId() == null : this.getExperimentsId().equals(other.getExperimentsId()))
            && (this.getClassNum() == null ? other.getClassNum() == null : this.getClassNum().equals(other.getClassNum()))
            && (this.getClassNumber() == null ? other.getClassNumber() == null : this.getClassNumber().equals(other.getClassNumber()))
            && (this.getCourseNumber() == null ? other.getCourseNumber() == null : this.getCourseNumber().equals(other.getCourseNumber()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getLabId() == null ? other.getLabId() == null : this.getLabId().equals(other.getLabId()))
            && (this.getLabTime() == null ? other.getLabTime() == null : this.getLabTime().equals(other.getLabTime()))
            && (this.getTeacherIds() == null ? other.getTeacherIds() == null : this.getTeacherIds().equals(other.getTeacherIds()))
            && (this.getTrainId() == null ? other.getTrainId() == null : this.getTrainId().equals(other.getTrainId()))
            && (this.getTrainSource() == null ? other.getTrainSource() == null : this.getTrainSource().equals(other.getTrainSource()))
            && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getLaboratoryAllocsId() == null) ? 0 : getLaboratoryAllocsId().hashCode());
        result = prime * result + ((getClassid() == null) ? 0 : getClassid().hashCode());
        result = prime * result + ((getCourseid() == null) ? 0 : getCourseid().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getLaboratoryId() == null) ? 0 : getLaboratoryId().hashCode());
        result = prime * result + ((getExperimentsId() == null) ? 0 : getExperimentsId().hashCode());
        result = prime * result + ((getClassNum() == null) ? 0 : getClassNum().hashCode());
        result = prime * result + ((getClassNumber() == null) ? 0 : getClassNumber().hashCode());
        result = prime * result + ((getCourseNumber() == null) ? 0 : getCourseNumber().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getLabId() == null) ? 0 : getLabId().hashCode());
        result = prime * result + ((getLabTime() == null) ? 0 : getLabTime().hashCode());
        result = prime * result + ((getTeacherIds() == null) ? 0 : getTeacherIds().hashCode());
        result = prime * result + ((getTrainId() == null) ? 0 : getTrainId().hashCode());
        result = prime * result + ((getTrainSource() == null) ? 0 : getTrainSource().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", laboratoryAllocsId=").append(laboratoryAllocsId);
        sb.append(", classid=").append(classid);
        sb.append(", courseid=").append(courseid);
        sb.append(", userId=").append(userId);
        sb.append(", laboratoryId=").append(laboratoryId);
        sb.append(", experimentsId=").append(experimentsId);
        sb.append(", classNum=").append(classNum);
        sb.append(", classNumber=").append(classNumber);
        sb.append(", courseNumber=").append(courseNumber);
        sb.append(", createTime=").append(createTime);
        sb.append(", labId=").append(labId);
        sb.append(", labTime=").append(labTime);
        sb.append(", teacherIds=").append(teacherIds);
        sb.append(", trainId=").append(trainId);
        sb.append(", trainSource=").append(trainSource);
        sb.append(", type=").append(type);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}